<%-- 
    Document   : main
    Created on : 23/09/2014, 22:20:02
    Author     : leoomoreira
--%>

<%@page import="cronos.metric.Metric"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../header.jsp" %>
<div id="title">Metric Form</div>
<% if (request.getAttribute("message") != null) {%>
<br/>
<div id="message"><%=request.getAttribute("message").toString()%></div>
<% }%>
<br/>
<form action="<%=request.getAttribute("action")%>" method="post">
    <div class="table">
        <div class="row">
            <div class="label">Id:</div>
            <div class="field"><input type="text" name="id" value="<%= (request.getAttribute("metric") != null ? ((Metric) request.getAttribute("metric")).getId() : "")%>" readonly="true" /></div>
        </div>
        <div class="row">
            <div class="label">Name:</div>
            <div class="field"><input type="text" name="name" value="<%= (request.getAttribute("metric") != null ? ((Metric) request.getAttribute("metric")).getName() : "")%>" /></div>
        </div>
    </div>
    <div>
        <button type="submit" class="save">
            <img src="images/save.png" title="Save" />Save
        </button>
    </div>
</form>
<br/>
<button type="button" class="search" onclick="document.location = 'MetricList'">
    <img src="images/search.png" />Search
</button>
<%@include file="../footer.jsp" %>